package com.my.test.design.Prototype;

public class Body implements Cloneable {

    private Head head;

    public Body (Head head){
        this.head = head;
    }

    public Head getHead() {
        return head;
    }

    public void setHead(Head head) {
        this.head = head;
    }


    /**
     * 对象Object中方法clone
     */
    public Body clone() throws CloneNotSupportedException {
        Body body = (Body)super.clone();
        body.head = head.clone();
        return body;
    }


}
